﻿#include <iostream>
using namespace std;
int main()
{
    bool a = 1000, b = false;
    cout << "size(bool=)" << sizeof(bool) << endl;
    cout << "a=" << a << "b="<<b<<endl;
    cout << "a+a+a+b=" << a + a + a + b << endl;
    //找到布尔变量b的内存，把里面的数据强制为4.
    char* c = (char*)&b;
    *c = 255;
    cout << "b=" << b << endl;
    //bool类型的本质是unsigned char
}

